﻿using System;
public delegate void Handler();
public class Clock
{
    public event Handler Tick;
    public event Handler Alarm;
    public void Start()
    {
        Tick();
    }
    public void Wake()
    {
        Alarm();
    }
}
public class Subscriber
{
    public Clock clock = new Clock();
    public Subscriber()
    {
        clock.Tick += T;
        clock.Alarm += A;
    }
    public void T()
    {
        Console.WriteLine("tick tick"); // 滴答滴答地响
    }
    public void A()
    {
        Console.WriteLine("biibiiiiibiiiiii"); // 哔哔地响
    }
}
class Program
{
    static void Main()
    {
        Subscriber subscriber = new Subscriber();
        subscriber.clock.Start();
        subscriber.clock.Wake();
    }
}